﻿@model TabPageModel
@{
    ViewBag.Title = Model.Title;
    var url = Request.RawUrl;
}
<div class="container" style="margin-top:20px;min-height:500px;">
    <div class="row">
        <div class="col-md-3">
            <div class="panel panel-default">
                <div class="panel-body" style="border:1px solid #ccc;">
                    @Html.Partial("_UserInfo", Model.User)
                </div>
            </div>
            <div class="panel panel-default">
                <div class="panel-body" style="border:1px solid #ccc;">
                    @Html.Partial("_UserNavigation", Model.User)
                </div>
            </div>
        </div>
        <div class="col-md-9">
            <div class="panel panel-default">
                <div class="panel-body">
                    <ul class="nav nav-tabs tabs" style="border-bottom:1px solid #ccc;margin-bottom:20px;font-size:18px;">
                        @foreach (var item in Model.Tabs)
                        {
                            var active = url.Contains("t=" + item.Code) ? "active" : string.Empty;
                            <li class="@active"><a href="@Html.Raw(Request.AddFragment("t=" + item.Code))">@item.Name</a></li>
                        }
                    </ul>
                    <div class="tab-content">
                        <div class="tab-pane active">
                            @if (Model.Data != null)
                            {
                                @Html.Partial(Model.PartialView, Model.Data)
                            }
                            else
                            {
                                @Html.Partial(Model.PartialView)
                            }
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>